home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / OS / FWWindow / Include / FWFloWin.h next >
Encoding:
Text File  |  1995-11-08  |  2.6 KB  |  93 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWFloWin.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9. //
  10. //    FW_CFloatWindow: Wrapper for a floating ODWindow.
  11. //    
  12. //        The creation of a FW_CFloatingWindow works differently from FW_CWindow. Usually in your
  13. //        part Initialize method your directly create the floating windows your need (don't forget
  14. //        FW_CWindow and FW_CFloatingWindow are autodestruct objects)
  15. //        
  16. //        void CMyPart::Initialize()
  17. //        {
  18. //                ...
  19. //                fPaletteWindow = FW_NEW(FW_CFloatingWindow, (this, fPalettePresentation, paletteRect));
  20. //                ...
  21. //        }
  22. //
  23. //        Floating windows are created hidden. You can call FW_CWindow::Show() or FW_CWindow::Hide() to 
  24. //        show/Hide your floating windows. When your part is desactivated/activated, the visible floating windows 
  25. //        will be automatically hidden/shown.
  26. //    
  27.  
  28. #ifndef FWFLOWIN_H
  29. #define FWFLOWIN_H
  30.  
  31. // ----- OS Layer -----
  32.  
  33. #ifndef FWWINDOW_H
  34. #include "FWWindow.h"
  35. #endif
  36.  
  37. // ----- OpenDoc Includes -----
  38.  
  39. #ifndef _ODTYPES_
  40. #include <ODTypes.h>
  41. #endif
  42.  
  43. #if FW_LIB_EXPORT_PRAGMAS
  44. #pragma lib_export on
  45. #endif
  46.  
  47. //========================================================================================
  48. //    Forward Declarations
  49. //========================================================================================
  50.  
  51. class FW_CLASS_ATTR ODPart;
  52.  
  53. //========================================================================================
  54. //    class FW_CFloatingWindow
  55. //========================================================================================
  56.  
  57. class FW_CLASS_ATTR FW_CFloatingWindow : public FW_CWindow
  58. {
  59. public:
  60.     FW_DECLARE_CLASS
  61.  
  62. //----------------------------------------------------------------------------------------
  63. //    Constructors/Destructor
  64. //
  65. public:
  66.     FW_CFloatingWindow(Environment* ev, 
  67.                         ODPart* thePart,
  68.                         ODTypeToken presentation,
  69.                         const FW_CString& windowTitle,
  70.                         const FW_CPoint& interiorSize,
  71.                         const FW_CPoint& position,
  72.                         FW_Boolean hasCloseBox);
  73.     virtual ~FW_CFloatingWindow();
  74.     
  75. //----------------------------------------------------------------------------------------
  76. //    Inherited API
  77. //
  78. public:
  79.     virtual void        HideShowOnActivate(Environment* ev, FW_Boolean state);
  80.         
  81. //----------------------------------------------------------------------------------------
  82. //    Data Members
  83. //
  84. private:
  85.     FW_Boolean            fWasShown;            // Used when floating is hidden on deactivate
  86. };
  87.  
  88. #if FW_LIB_EXPORT_PRAGMAS
  89. #pragma lib_export off
  90. #endif
  91.  
  92. #endif
  93.